const SIZE = 10 * 1024 * 1024;    // 10M
// 生成文件切片
export const createFileChunk = (file, size = SIZE) => {
  const fileChunkList = [];
  let cur = 0;
  while (cur < file.size) {
    // 利用Blob.prototype.slice
    fileChunkList.push({ file: file.slice(cur, cur + size) });
    cur += size;
  }
  return fileChunkList;
}

